<html>
<head>
	<title>Search</title>
</head>
<body>
	{% if error %}
		<p style="color: red;">Please submit a search term.</p>
	{% endif %}
	<form action="/search/" method="get">
		<input type="text" name="q">
		<input type="submit" value="Search">
	</form>
	<hr>
	{% if query %}
		<p>Your searched for: <strong>{{ query }}</strong></p>
		{% if books %}
		<p>Found {{books|length}} book{{books|pluralize}} .</p>
		<ul>
		{% for book in books %}
			<li>{{ book.title }}</li>
		{% endfor %}
		</ul>
		{% else %}
		<p>No books matched your search criteria.</p>
	{% endif %}
	{% endif %}
</body>
</html>